package com.command.center.pucms.pucmsgateway.domain;

import java.io.Serializable;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;

/**
 * <p>
 * 用户角色关系表
 * </p>
 *
 * @author zlb
 * @since 2021-04-23
 */
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("pucms_t_role_user")
public class UserToRole extends Model<UserToRole> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Integer id;
    /**
     * 用户主键
     */
    @TableField("user_id")
    private Integer UserId;
    /**
     * 角色主键
     */
    @TableField("role_id")
    private Integer roleId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
